package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 材料实体类
 *
 * @author 吴旭
 */
public class MaterialEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = -8652097944552602605L;
    private Long MaterialId;
    private Long CatalogueId;                // 所属材料目录
    private String CatalogueName;
    private String MaterialCode;
    private String MaterialName;
    private String MaterialShortName;
    private String MnemonicCode;
    private Long SupplierId;
    private String SupplierNo;
    private String SupplierName;
    private String ColourNumber;
    private String ColourName;
    private String Specification;
    private String YarnCount;
    private String FabricWidth;
    private String GramWeight;
    private Long UomId;                      // 计量单位
    private String UomNo;
    private String UomName;
    private String MaterialComposition;
    private String QualityStandard;
    private Float UnitPrice;
    private Float SparedQuantity;            // 损耗
    private String FabricMinimumLot;         // 开机量
    private String DyeingMinimumLot;         // 起染量
    private Float MinimumStock;
    private Float MaximumStock;
    private Float SafetyStock;
    private Float Coefficient;
    private Float DyingSubCharge;           // 小缸费
    private String MeshBeltOpening;
    private Long ToleranceTypeId;           // 允差类型用于判断材料的订货损耗及到货允许
    private String ToleranceTypeName;
    private Long MaterialSourceTypeId;      // 物料来源
    private String MaterialSourceTypeName;
    private String MaterialFlag;            // 材料区分标记 0：面料 1：辅料
    private String Description;
    private Integer IsSupplierGroupMember;  // 是否为该供应商权限分组成员
    // 用于导出excel
    private String FieldsName;
    private String FieldsComment;

    public Long getMaterialId() {
        return MaterialId;
    }

    public void setMaterialId(Long MaterialId) {
        this.MaterialId = MaterialId;
    }

    public Long getCatalogueId() {
        return CatalogueId;
    }

    public void setCatalogueId(Long CatalogueId) {
        this.CatalogueId = CatalogueId;
    }

    public String getCatalogueName() {
        return CatalogueName;
    }

    public void setCatalogueName(String CatalogueName) {
        this.CatalogueName = CatalogueName;
    }

    public String getMaterialCode() {
        return MaterialCode;
    }

    public void setMaterialCode(String MaterialCode) {
        this.MaterialCode = MaterialCode;
    }

    public String getMaterialName() {
        return MaterialName;
    }

    public void setMaterialName(String MaterialName) {
        this.MaterialName = MaterialName;
    }

    public String getMaterialShortName() {
        return MaterialShortName;
    }

    public void setMaterialShortName(String MaterialShortName) {
        this.MaterialShortName = MaterialShortName;
    }

    public String getMnemonicCode() {
        return MnemonicCode;
    }

    public void setMnemonicCode(String MnemonicCode) {
        this.MnemonicCode = MnemonicCode;
    }

    public Long getSupplierId() {
        return SupplierId;
    }

    public void setSupplierId(Long SupplierId) {
        this.SupplierId = SupplierId;
    }

    public String getSupplierNo() {
        return SupplierNo;
    }

    public void setSupplierNo(String SupplierNo) {
        this.SupplierNo = SupplierNo;
    }

    public String getSupplierName() {
        return SupplierName;
    }

    public void setSupplierName(String SupplierName) {
        this.SupplierName = SupplierName;
    }

    public String getColourNumber() {
        return ColourNumber;
    }

    public void setColourNumber(String ColourNumber) {
        this.ColourNumber = ColourNumber;
    }

    public String getColourName() {
        return ColourName;
    }

    public void setColourName(String ColourName) {
        this.ColourName = ColourName;
    }

    public String getSpecification() {
        return Specification;
    }

    public void setSpecification(String Specification) {
        this.Specification = Specification;
    }

    public String getYarnCount() {
        return YarnCount;
    }

    public void setYarnCount(String YarnCount) {
        this.YarnCount = YarnCount;
    }

    public String getFabricWidth() {
        return FabricWidth;
    }

    public void setFabricWidth(String FabricWidth) {
        this.FabricWidth = FabricWidth;
    }

    public String getGramWeight() {
        return GramWeight;
    }

    public void setGramWeight(String GramWeight) {
        this.GramWeight = GramWeight;
    }

    public Long getUomId() {
        return UomId;
    }

    public void setUomId(Long UomId) {
        this.UomId = UomId;
    }

    public String getUomNo() {
        return UomNo;
    }

    public void setUomNo(String UomNo) {
        this.UomNo = UomNo;
    }

    public String getUomName() {
        return UomName;
    }

    public void setUomName(String UomName) {
        this.UomName = UomName;
    }

    public String getMaterialComposition() {
        return MaterialComposition;
    }

    public void setMaterialComposition(String MaterialComposition) {
        this.MaterialComposition = MaterialComposition;
    }

    public String getQualityStandard() {
        return QualityStandard;
    }

    public void setQualityStandard(String QualityStandard) {
        this.QualityStandard = QualityStandard;
    }

    public Float getUnitPrice() {
        return UnitPrice;
    }

    public void setUnitPrice(Float UnitPrice) {
        this.UnitPrice = UnitPrice;
    }

    public Float getSparedQuantity() {
        return SparedQuantity;
    }

    public void setSparedQuantity(Float SparedQuantity) {
        this.SparedQuantity = SparedQuantity;
    }

    public String getFabricMinimumLot() {
        return FabricMinimumLot;
    }

    public void setFabricMinimumLot(String FabricMinimumLot) {
        this.FabricMinimumLot = FabricMinimumLot;
    }

    public String getDyeingMinimumLot() {
        return DyeingMinimumLot;
    }

    public void setDyeingMinimumLot(String DyeingMinimumLot) {
        this.DyeingMinimumLot = DyeingMinimumLot;
    }

    public Float getMinimumStock() {
        return MinimumStock;
    }

    public void setMinimumStock(Float MinimumStock) {
        this.MinimumStock = MinimumStock;
    }

    public Float getMaximumStock() {
        return MaximumStock;
    }

    public void setMaximumStock(Float MaximumStock) {
        this.MaximumStock = MaximumStock;
    }

    public Float getSafetyStock() {
        return SafetyStock;
    }

    public void setSafetyStock(Float SafetyStock) {
        this.SafetyStock = SafetyStock;
    }

    public Float getCoefficient() {
        return Coefficient;
    }

    public void setCoefficient(Float Coefficient) {
        this.Coefficient = Coefficient;
    }

    public Float getDyingSubCharge() {
        return DyingSubCharge;
    }

    public void setDyingSubCharge(Float DyingSubCharge) {
        this.DyingSubCharge = DyingSubCharge;
    }

    public String getMeshBeltOpening() {
        return MeshBeltOpening;
    }

    public void setMeshBeltOpening(String MeshBeltOpening) {
        this.MeshBeltOpening = MeshBeltOpening;
    }

    public Long getToleranceTypeId() {
        return ToleranceTypeId;
    }

    public void setToleranceTypeId(Long ToleranceTypeId) {
        this.ToleranceTypeId = ToleranceTypeId;
    }

    public String getToleranceTypeName() {
        return ToleranceTypeName;
    }

    public void setToleranceTypeName(String ToleranceTypeName) {
        this.ToleranceTypeName = ToleranceTypeName;
    }

    public Long getMaterialSourceTypeId() {
        return MaterialSourceTypeId;
    }

    public void setMaterialSourceTypeId(Long MaterialSourceTypeId) {
        this.MaterialSourceTypeId = MaterialSourceTypeId;
    }

    public String getMaterialSourceTypeName() {
        return MaterialSourceTypeName;
    }

    public void setMaterialSourceTypeName(String MaterialSourceTypeName) {
        this.MaterialSourceTypeName = MaterialSourceTypeName;
    }

    public String getMaterialFlag() {
        return MaterialFlag;
    }

    public void setMaterialFlag(String MaterialFlag) {
        this.MaterialFlag = MaterialFlag;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Integer getIsSupplierGroupMember() {
        return IsSupplierGroupMember;
    }

    public void setIsSupplierGroupMember(Integer IsSupplierGroupMember) {
        this.IsSupplierGroupMember = IsSupplierGroupMember;
    }

    public String getFieldsName() {
        return FieldsName;
    }

    public void setFieldsName(String FieldsName) {
        this.FieldsName = FieldsName;
    }

    public String getFieldsComment() {
        return FieldsComment;
    }

    public void setFieldsComment(String FieldsComment) {
        this.FieldsComment = FieldsComment;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MaterialEntity)) {
            return false;
        }

        final MaterialEntity that = (MaterialEntity) o;

        return new EqualsBuilder()
                .append(this.getMaterialId(), that.getMaterialId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getMaterialId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
